package cn.rkylin.oms.system.logistics.vo;

import cn.rkylin.oms.system.logistics.domain.Logistics;

/**
 * 物流公司VO
 *
 */
public class LogisticsVO extends Logistics {
    private static final String STATUS_CHK = "<input id=\"chkItem\" class=\"chkRule icheck\" style=\"display:none;\"  name=\"chkItem\" type=\"checkbox\" lgstid=\"%s\" /></input>";

    private static final String OPERATION_BTN_SELECT = "<button onclick=\"window.top.window.getCurrentIframe().contentWindow.selectLgst(\'%s\',\'%s\',\'%s\',this)\" type=\"button\" class=\"btn btn-success btn-xs\"><i class=\"fa fa-check\"></i>&nbsp;选择</button>";

    /**
     * 序列号id
     */
    private static final long serialVersionUID = 7261100665980740680L;

    /**
     * orderBy子句
     */
    private String orderBy;

    /**
     * 搜索条件
     */
    private String searchCondition;

    /**
     * checkbox
     */
    private String chk;

    private String updateLgstName;

    private String updateLgstCode;

    private String operation;

    public String getOperation() {
        StringBuffer opButton = new StringBuffer();
        opButton.append(String.format(OPERATION_BTN_SELECT, this.getLgstId(), this.getLgstName(), this.getLgstCode()));
        this.operation = opButton.toString();
        return this.operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getUpdateLgstName() {
        return updateLgstName;
    }

    public void setUpdateLgstName(String updateLgstName) {
        this.updateLgstName = updateLgstName;
    }

    public String getUpdateLgstCode() {
        return updateLgstCode;
    }

    public void setUpdateLgstCode(String updateLgstCode) {
        this.updateLgstCode = updateLgstCode;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getSearchCondition() {
        return searchCondition;
    }

    public void setSearchCondition(String searchCondition) {
        this.searchCondition = searchCondition;
    }

    public String getChk() {
        return this.chk;
    }

    public void setChk(String chk) {
        this.chk = String.format(STATUS_CHK, this.getLgstId()).toString();
    }

}
